home *** CD-ROM | disk | FTP | other *** search
- Path: soap.news.pipex.net!pipex!usenet
- From: m.hendry@dial.pipex.com (Mathew Hendry)
- Newsgroups: comp.sys.amiga.misc
- Subject: Re: .key
- Date: Thu, 25 Jan 96 02:51:35
- Organization: Private node.
- Distribution: world
- Message-ID: <19960125.41A780.2EFE@aj058.du.pipex.com>
- References: <1996Jan23.163238.27082@nosc.mil>
- NNTP-Posting-Host: aj058.du.pipex.com
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
-
- Gary E. Dunn (gdunn@bluefish.nosc.mil) wrote:
- : I have a game that is started by executing a script
- : via iconx. What puzzles me is that the following
- : command line is executed before the game is started:
- :
- : ..key dummy
- :
- : This puzzles me because there are no files on the disk
- : named .key or dummy. Is anyone familiar with this
- : command?
-
- .key is a shell script command which, when included at the beginning of
- a script, specifies the format of that script's command line arguments.
- For example, the standard AmigaOS script S:SPAT starts:
-
- .key COM/A,PAT/A,OPT1,OPT2,OPT3,OPT4
- .bra {
- .ket }
-
- COM and PAT are mandatory arguments, as indicated by the /A suffix. The
- script will fail if these two arguments are not added to the command line.
- OPT1 ... OPT4 are optional arguments, and so have no suffix.
-
- .bra and .ket specify the characters used to delimit references to the
- arguments within the script, these characters being < and > by default. In SPAT
- these delimiters have been modified to { and }.
-
- So, if you want to reference the COM argument within the script, write it
- as {COM}. For example, in SPAT again:
-
- List >T:q{$$} {PAT} LFORMAT "{COM} *"%s%s*" {OPT1} {OPT2} {OPT3} {OPT4}"
- ^^^^^ ^^^^^ ^^^^^^ ^^^^^^ ^^^^^^ ^^^^^^
-
- where {$$} represents the current shell process number.
-
- If you type "execute spat banana #?.c sort jumble fix break" within
- shell process 8, the above line will be run as:
-
- List >T:q8 #?.c LFORMAT "banana *"%s%s*" sort jumble fix break"
-
- -- Mat.
-